function search(inputId)
{
	var course = document.getElementById(inputId).value;
	loadPage('shared/viewCourse.jsp?' + inputId + '=' + encodeURIComponent(course));
}

function searchByName() {
	return search('courseName');
}
function searchById() {
	return search('courseId');
}

function hide(id)
{
	document.getElementById(id).style.display = 'none';
}

/*
// Showing functions (currently unused):
function show(id)
{
	showElem(document.getElementById(id));
}

function showIfNotEmpty(id)
{
	//e.g. onfocus="showIfNotEmpty('autosuggest');" in the textual input
	var div = document.getElementById(id);
	if (div.hasChildNodes())
		showElem(div);
}

function showElem(elem)
{
	elem.style.display = 'block';
}
*/
